<template>
  <view class="page">
    <view class="card">
      <text class="title">积分商品订单</text>
      <view class="row"><text class="label">订单号</text><text class="val">{{ info.orderNo }}</text></view>
      <view class="row"><text class="label">状态</text><text class="val">{{ info.status }}</text></view>
      <view class="row"><text class="label">总积分</text><text class="val">{{ info.totalPoints }}</text></view>
      <view class="row"><text class="label">创建时间</text><text class="val">{{ info.createTime }}</text></view>
    </view>
  </view>
</template>

<script>
import { getShopOrder } from '@/api/goods'
export default {
  data(){
    return { id: '', info: {} }
  },
  onLoad(q){ this.id = q && q.id; this.fetch() },
  methods:{
    async fetch(){
      try{ const r = await getShopOrder(this.id); this.info = r && r.data || {} }catch(e){ this.info = {} }
    }
  }
}
</script>

<style scoped>
.page { background:#f7fafc; min-height:100vh; padding: 12rpx; }
.card { background:#fff; border-radius:16rpx; padding:16rpx; box-shadow:0 6rpx 20rpx rgba(0,0,0,.06); }
.title { display:block; font-weight:700; margin-bottom:8rpx; }
.row { display:flex; align-items:center; justify-content:space-between; padding: 8rpx 0; }
.label { color:#6b7280; }
.val { color:#111; }
</style>


